<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>用户登录</title>
</head>
<body>
    <h2>登录系统</h2>
    <form th:action="@{/login}" method="post">
        <label>用户名：</label>
        <input type="text" name="username" required><br><br>

        <label>密码：</label>
        <input type="password" name="password" required><br><br>

        <button type="submit">登录</button>
    </form>

    <div th:if="${param.error}">
        <p style="color:red;">用户名或密码错误，请重试</p>
    </div>

    <div th:if="${param.logout}">
        <p style="color:green;">你已成功登出</p>
    </div>

    <br>
    <a href="/oauth2/authorization/google">使用 Google 登录</a>
</body>
</html>
